function getRandomInt(min, max) {
    return Math.floor(Math.random() * (max - min + 1)) + min;
  }
  
  function updateRandomIntegers() {
    const selectedDate = new Date(document.getElementById('datePicker').value);
    const dayOfMonth = selectedDate.getDate();
    const randomIntegers = [
      getRandomInt(500, 600) + dayOfMonth+"人",
      getRandomInt(1600, 3100) + dayOfMonth+"人",
      getRandomInt(800, 1100) + dayOfMonth+"单",
      getRandomInt(500, 600) + dayOfMonth,
      getRandomInt(5, 10) + dayOfMonth,
      getRandomInt(8000, 310000) + dayOfMonth+"元",
      getRandomInt(24000, 3100000) + dayOfMonth+"元",
      getRandomInt(240000,31000000) + dayOfMonth+"元"
    ];
  
    document.getElementById('randomInt1').textContent = randomIntegers[0];
    document.getElementById('randomInt2').textContent = randomIntegers[1];
    document.getElementById('randomInt3').textContent = randomIntegers[2];
    document.getElementById('randomInt4').textContent = randomIntegers[3];
    document.getElementById('randomInt5').textContent = randomIntegers[4];
    document.getElementById('randomInt6').textContent = randomIntegers[5];
    document.getElementById('randomInt7').textContent = randomIntegers[6];
    document.getElementById('randomInt8').textContent = randomIntegers[7];
  }
  
  document.addEventListener('DOMContentLoaded', function() {
    const datePicker = document.getElementById('datePicker');
    datePicker.valueAsDate = new Date();
    updateRandomIntegers();
  
    datePicker.addEventListener('change', updateRandomIntegers);
  });
  